function getWords(inputStr, pre) {
  const strs = inputStr.replaceAll("'", ' ').replaceAll(',', ' ').replaceAll('.', ' ').split(' ')
  let temp = []
  strs.forEach(str => {
    if (str.startsWith(pre) && str !== pre) {
      temp.push(str)
    }
  })
  return temp.length ? temp.sort().join(' ') : pre
}

const str = `The furthest distance in the world, Is not between life and death, But when I stand in front of you, Yet you don't know that I love you.`
console.log(getWords(str, 'f'));